.data
pBuff	DB 25 DUP (?)	
pVect	DB 10 DUP (?)
mn	DB 10
a		db 6 dup(' ')
WDate DW ?
.code

;______________    
ReadInt PROC NEAR
		
	xor AX, AX
	xor BX, BX
	xor CX, CX
	xor DX, DX
	
	mov DX,offset pBuff
    	mov ah, 3fh
	int 21h	
	
	StrToIntLoop:
			sub ax,2
			mov cx,ax ;  CX  
			mov si,0 ; 
			xor AX,AX ;  AX   

	cycle: ; 
		mov bL, pBuff(si)
		sub bL,30h
		add AX,BX
		add si,1
		cmp cx,1
		jne mnoj ; CX<>1 (  )

			
	ret ;     
	 mnoj:
			mul mn; Ax*10
	loop cycle
ReadInt ENDP

;______________    
WriteInt PROC NEAR
			mov si,0
			mov cx,25
		zanul:
			mov buff[si],0
			add si,1
			loop zanul
			mov si,0
			mov cx,10
		dill:
			cmp ax,10
			jl last
			xor dx,dx
			div cx ; ĳ DX:AX  CX (10),
			xchg ax,dx ; ̳  
			add al,'0' ;   AL   
			mov buff[si],al
			add si,1
			xchg ax,dx
			cmp ax,10
			jge dill
		last:
			add al,'0'
			mov buff[si],al
			add si,1

			mov si,24
			mov cx,25
		vuv:
			cmp buff[si],0
			jne cifr
			je repeat
		repeat:
			sub si,1
			loop vuv
		cifr:
			mov dl,buff[si]
			mov ah,02h
			int 21h
			sub si,1
			loop vuv
	ret
WriteInt ENDP

;______________  
WriteStr PROC NEAR
	push AX

	mov aH, 9h
	INT 21h
	
	pop AX
ret
WriteStr ENDP


;______________  
WriteDate PROC NEAR
	mov wDate, AX
	
	shl 	ax,11
	shr 	ax,11
	call WriteInt
mov ah,2
mov dx,'.'
Int 21h
	
	mov AX, wDate

	shl 	ax,7
	shr 	ax,12
	call WriteInt

mov ah,2
mov dx,'.'
Int 21h

	mov AX, wDate

	shr 	ax,9
	add 	ax,1980
	call WriteInt


ret
WriteDate ENDP